import {getmenulist} from '../../../util/axios'

const state = {
  menuList:[]
}

const getters = {
  getMenuList(state){
    return state.menuList
  }
}

const mutations = {
  REQ_MENULIST(state,payload){
    state.menuList = payload
  }
}

const actions = {
  getMenuListAction({commit}){
    getmenulist().then(res=>{
      commit('REQ_MENULIST',res.data.list)
    })
  }
}

export default {
  state,
  getters,
  mutations,
  actions,
  namespaced:true
}